package entity;
// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Critique entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "critique", catalog = "house")
public class Critique implements java.io.Serializable {

	// Fields

	private Integer id;
	private News news;
	private String CContent;

	// Constructors

	/** default constructor */
	public Critique() {
	}

	/** full constructor */
	public Critique(News news, String CContent) {
		this.news = news;
		this.CContent = CContent;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "newsid", nullable = false)
	public News getNews() {
		return this.news;
	}

	public void setNews(News news) {
		this.news = news;
	}

	@Column(name = "c_content", nullable = false, length = 200)
	public String getCContent() {
		return this.CContent;
	}

	public void setCContent(String CContent) {
		this.CContent = CContent;
	}

}